#include "trajectoryPoint.h"

TrajectoryPoint::TrajectoryPoint()
{
    pathpoint_.x = 0;
    pathpoint_.y = 0;
    pathpoint_.z = 0;
    pathpoint_.v = 0;
    pathpoint_.a = 0;
    pathpoint_.s = 0;
    pathpoint_.theta = 0;
    pathpoint_.kappa = 0;
    pathpoint_.dkappa = 0;

    x = 0;             // x position
    y = 0;             // y position
    z = 0;             // z position
    theta = 0;         // yaw in rad
    kappa = 0;         // curvature曲率
    dkappa = 0;        // curvature曲率导数
    v = 0;             // Tangential velocity
    a = 0;             // Tangential acceleration
    relative_time = 0; // relative_time
    s = 0;             // s position along spline
}

void TrajectoryPoint::set_x(double x_)
{
    x = x_;
    pathpoint_.set_x(x_);
}
void TrajectoryPoint::set_y(double y_)
{
    y = y_;
    pathpoint_.set_y(y_);
}
void TrajectoryPoint::set_z(double z_)
{
    z = z_;
    pathpoint_.set_z(z_);
}
void TrajectoryPoint::set_theta(double theta_)
{
    theta = theta_;
    pathpoint_.set_theta(theta_);
}
void TrajectoryPoint::set_s(double s_)
{    PathPoint pathpoint_;
    s = s_;
    pathpoint_.set_s(s_);
}
void TrajectoryPoint::set_kappa(double kappa_)
{
    kappa = kappa_;
    pathpoint_.set_kappa(kappa_);
}
void TrajectoryPoint::set_dkappa(double dkappa_)
{
    dkappa = dkappa_;
    pathpoint_.set_dkappa(dkappa_);
}
void TrajectoryPoint::set_v(double v_)
{
    v = v_;
    pathpoint_.set_v(v_);
}
void TrajectoryPoint::set_a(double a_)
{
    a = a_;
    pathpoint_.set_a(a_);
}
void TrajectoryPoint::set_relative_time(double relative_time_)
{
    relative_time = relative_time_;
}